package com.wkk.controller;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.wkk.entity.User;

import com.wkk.service.UserService;

@Controller
@CrossOrigin // 跨域允许
@RequestMapping("/user")
public class UserController {
	@Resource
	private UserService userService;

	@RequestMapping("/list")
	@ResponseBody
	public List<User> list() {
		Map<String, Object> map = new HashMap<String, Object>();
		List<User> userList = userService.list(map);
		return userList;

	}

}
